﻿/*
 * Authors:
 *   钟峰(Popeye Zhong) <9555843@qq.com>
 *
 * Copyright (c) 2017 Flagwind Game Studio. All rights reserved.
 */

using System;
using System.Collections.Generic;

namespace Flagwind.Gaming
{
	/// <summary>
	/// 表示卡牌游戏中牌局的实体类。
	/// </summary>
	public class GameRound
	{
		#region 成员字段
		private long _roundId;
		private byte[] _cards;
		private Hand[] _hands;
		private int _handIndex;
		#endregion

		#region 公共属性
		/// <summary>
		/// 获取当前牌局的编号。
		/// </summary>
		public long RoundId
		{
			get
			{
				return _roundId;
			}
		}

		/// <summary>
		/// 获取当前牌局的卡牌集。
		/// </summary>
		public byte[] Cards
		{
			get
			{
				return _cards;
			}
		}

		/// <summary>
		/// 获取当前牌局的参与者。
		/// </summary>
		public Hand[] Hands
		{
			get
			{
				return _hands;
			}
		}

		/// <summary>
		/// 获取当前待出牌的参与人索引。
		/// </summary>
		public int HandIndex
		{
			get
			{
				return _handIndex;
			}
		}
		#endregion

		#region 嵌套结构
		public struct Hand
		{
			public uint PlayerId;
			public IEnumerable<byte> Cards;
			public bool IsBanker;
		}
		#endregion
	}
}
